import { http } from "@/uni-sub-base/service/request.js"
let serviceName = "TakeDelivery/"
import { getBaseUrl } from "@/utils/appUrls.js"
//申请自提货站点
export function ApplyTakeDelivery(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "ApplyTakeDelivery",
        data,
    })
}
//商品列表-带规格
export function getWholeSaleListForSku(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "getWholeSaleListForSku",
        data,
    })
}
//团购开关
export function GetCommuntiyIsOpen() {
    return http.post({
        url: getBaseUrl() + serviceName + "GetCommuntiyIsOpen",
    })
}

export function GetMyApplyTakeDelivery() {
    return http.post({
        url: getBaseUrl() + serviceName + "GetMyApplyTakeDelivery",
    })
}
//获取提货地址列表
export function GetTakeDeliveryList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetTakeDeliveryList",
        data,
    })
}
//获取提货地址
export function GetDefaultTakeDelivery() {
    return http.post({
        url: getBaseUrl() + serviceName + "GetDefaultTakeDelivery",
    })
}
//获取用户默认提货点
export function GetUserDefaultTakeDelivery(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetUserDefaultTakeDelivery",
        data,
    })
}
//获取提货地址列表
export function GetUserTakeDeliveryPage(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetUserTakeDeliveryPage",
        data,
    })
}

export function GetUsableTakeDeliveryPage(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetUsableTakeDeliveryPage",
        data,
    })
}
//保存用户提货点(设为默认)
export function SaveUserTakeDelivery(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "SaveUserTakeDelivery",
        data,
    })
}
